{% extends "bugs/base.html" %}
{% block title %}Timeline{% endblock %}
{% block content_title %}{% endblock %}
{% block stylesheet %}{% load media %}{% media_prefix %}css/bugs-timeline.css{% endblock %}
{% block main %}
{% regroup timelines by date|date:"d.m.Y" as timelines_group %}
<h2>{% block listtitle %}Time Line - from: {{ start_date|date:"d.m" }}, to: {{ end_date|date:"d.m" }}{% endblock %}</h2>
<div id="tablecontent">
{% if timelines_group %}
<ul id="timeline">  
   {% for timeline in timelines_group %}
  <li><p class="tl_grouper">{{ timeline.grouper }}</p></li>
  <ul>
    {% for action in timeline.list %}
    <li class="tl_item"><a href="{% url homesite.bugs.views.taskinfo project.norm_name,action.task.id %}">{{ action.date|date:"H:i" }} - Task {{ action.task.serial }} changed by {{ action.user }}</a>
    <p>{{ action.action|safe|linebreaksbr }}</p>
    {% if action.comment %}<p>Comment: {{ action.comment|linebreaksbr }}</p>{% endif %}
    {% if action.attachment %}
	Add attach file <a href="{% load media %}{% media_prefix %}attach/{{ action.attachmentname }}">{{ action.attachment }}</a>{% endif %}
    </li>
    {% endfor %}
  </ul>
  </li>
  {% endfor %}
</ul>
{% else %}
<p>No action avalible</p>
{% endif %}
</div>
{% endblock %}
